cmake_minimum_required (VERSION 2.8)
project(server)

# 导入工具
include(util.cmake)

# 设置标志
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAAGS} -g -std=c++11 -Wno-builtin-macro-redefined")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAAGS} -O3 -D NDEBUG")

set(target_name server)
set(libs pthread event)
file(GLOB src_files src/*.cpp src/ftptask/*.cpp src/thread/*.cpp src/util/*.cpp)
add_executable(${target_name} ${src_files})
target_link_libraries(${target_name} ${libs})
redefine_file_macro(${target_name})